package com.atwisdom.star.core.bsl.planner.entity;

import lombok.Data;

import java.util.Date;

/**
 * 报工明细表
 */
@Data
public class WorkReport {
    public final String className = "WorkReport";
    private String orderNumber;
    private Long number;
    private Long materialId;
    private String materialName;
    private String materialPCode;
    private String materialBCode;
    private String materialModel;
    private String materialSpec;
    private String materialUnit;

    private String status;
    private Date startDate;   //报工开始时间
    private Date endDate;     //报工结束时间
    private Integer workReportNumber; //报工数量
    private Integer poorNumber; //不良品数量
    private Integer quantity; //总报工数量
    public Integer getQuantity() {
       if(this.workReportNumber==null){
           this.workReportNumber=0;
       }
       if(this.poorNumber == null){
           this.poorNumber = 0;
       }
        this.quantity = -(this.workReportNumber+this.poorNumber);
        return quantity;
    }
}
